<?php

namespace App\Repository\Repositories;

use App\Repository\Models\ProductAttributes;
use App\Repository\Repositories\Interfaces\ProductAttributesRepository;
 
class ProductAttributesRepositoryEloquent extends BaseRepository implements ProductAttributesRepository
{
  
    protected $fieldSearchable = [
        'id' ,
        'attributes'=>'like' ,
        'price'=>'between',

        'product.second_cat',
        'product.third_cat',
    ];


    public $fieldSearchReplace = [
          'third_cat'=> 'product.third_cat',
          'second_cat'=> 'product.second_cat',
    ];

    /**
    * 可关联查询的字段
    */
    public $withAllow = [
      'product'
    ];
   
    public function model()
    {
        return ProductAttributes::class;
    }

}
